#include "cubeFunctions.h"
#include "cubeCommands.h"
#include <iostream>

#define BAUD_RATE 9600
#define SER_PORT "/dev/ttyUSB0"


using namespace std; 

int main()
{

	cout << "This is the test program. Enjoy" << endl; 
	cout << "Blink Normal Call:\t" << blinkLed() << endl;
	cout << "Blink Using functionVector:\t" << functionVector[0]() << endl; 
	
	int fd = serialOpen(SER_PORT, BAUD_RATE);	// Opens serial connection to XBee
	if(fd < 0)
		cout << "Error, could not connect to XBee" << endl; 
	else{
		while(1){
			cout << "getExCommand Normal Call:\t" << getExCommand(fd) << endl; 
		}
	}
	//cout << "Normal Call:\t" << blinkLed() << endl;

	return 0; 
}

